package com.kyivmohyla.kma2.client.events.manager;

import com.google.gwt.event.shared.GwtEvent;
import com.kyivmohyla.kma2.shared.model.UIStaff;

public class ManagerLoginEvent extends GwtEvent<ManagerLoginEventHandler> {
    public static Type<ManagerLoginEventHandler> TYPE = new Type<ManagerLoginEventHandler>();
    private final UIStaff managerStaff;

    public ManagerLoginEvent(UIStaff managerStaff) {
        this.managerStaff = managerStaff;
    }

    public UIStaff getManagerStaff() {
        return managerStaff;
    }

    public Type<ManagerLoginEventHandler> getAssociatedType() {
        return TYPE;
    }

    protected void dispatch(ManagerLoginEventHandler handler) {
        handler.onManagerLogin(this);
    }
}
